#pragma once
#include "define.h"
#include <string>
using namespace std;

namespace cupid
{

void log(const char * szFormat, ...);

string format_str(const char * szFormat, ...);

int	str2int(string str);

int	splitPacket(const char* buf, int bufLen, int* idPacket, char** msg, int* msgSize);

int	unitePacket(char* buf, int bufLen, int idPacket, const char* msg, int msgSize);

bool initSocket();

bool cleanSocket();

int	getGUID();

int getTime();
}